/*******************************************************************************
 * Copyright (c) 2014 lifeng (lifengsofts@gmail.com)
 * See the file licenses/license.txt for copying permission.
 ******************************************************************************/
package cn.woblog.android.httputils.utils;

import java.lang.reflect.Type;

import com.google.gson.Gson;

public class JsonParse {
	private static Gson gson = new Gson();

	public static <T> T fromJson(String json, Class<T> clazz) {
		return gson.fromJson(json, clazz);
	}

	public static <T> T fromJson(String json, Type type) {
		return gson.fromJson(json, type);
	}

	public static String toJson(Object object) {
		return gson.toJson(object);
	}
}
